<?php if (!defined('THINK_PATH')) exit();?>﻿<!DOCTYPE html>

<html>

	<head>
		<meta charset="utf-8">
		<title>后台管理系统</title>
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="format-detection" content="telephone=no">

		<link rel="stylesheet" href="/ygcrafts/public/plugins/layui/css/layui.css" media="all" />
		<link rel="stylesheet" href="/ygcrafts/public/css/global.css" media="all">
		<link rel="stylesheet" href="/ygcrafts/public/plugins/font-awesome/css/font-awesome.min.css">
		<link rel="stylesheet" href="/ygcrafts/public/css/comment.css" media="all">

		<script type="text/javascript" src="/ygcrafts/public/js/jquery-3.1.1.js"></script>
		<script type="text/javascript" src="/ygcrafts/public/plugins/layui/layui.js"></script>
		<script type="text/javascript" src="/ygcrafts/public/js/common.js"></script>
		<script type="text/javascript" src="/ygcrafts/public/js/index.js"></script>
		
	</head>
	
	<body>

		<div class="layui-layout layui-layout-admin" style="border-bottom:solid 1px #efefef">
			<!-- 顶部按钮 -->
			<div class="layui-header header header-demo" >
				<div class="layui-main">
					<div class="admin-login-box">
						<a class="logo" style="left: 0;" href="http://beginner.zhengjinfan.cn/demo/beginner_admin/">
							<span style="font-size: 22px;">YgcraftsAdmin</span>
						</a>
						<div class="admin-side-toggle">
							<i class="fa fa-bars" aria-hidden="true"></i>
						</div>
						<div class="admin-side-full" onclick="fullScreen()"> 
							<i class="fa fa-life-bouy" aria-hidden="true"></i>
						</div>
					</div>
					<ul class="layui-nav admin-header-item">
						
						<!-- <li class="layui-nav-item" id="video1">
							<a href="javascript:;" style="float:left">消息中心</a>
							<span id="dian_h"></span>
						</li> -->
						<li class="layui-nav-item">
							<a href="javascript:;" class="admin-header-user">
								<img src="/ygcrafts/public/images/<?php echo ($admin_user_info["avater"]); ?>" />

								<span><?php echo ($admin_user_info["username"]); ?></span>
							</a>
							<dl class="layui-nav-child">
								<dd>
									<a href="javascript:;" onclick="jump_page('/ygcrafts/admin.php/password/list_.html','设置','修改密码')"><i class="fa fa-user-circle" aria-hidden="true" ></i> 修改密码</a>
								</dd>
								<dd>
									<!-- <a href="javascript:;"><i class="fa fa-gear" aria-hidden="true"></i> 基本资料</a> -->
								</dd>
								<!-- <dd id="lock">
									<a href="javascript:;">
										<i class="fa fa-lock" aria-hidden="true" style="padding-right: 3px;padding-left: 1px;"></i> 锁屏 (Alt+L)
									</a>
								</dd> -->
								<dd>
									<a href="/ygcrafts/admin.php/Baseindex/out"><i class="fa fa-sign-out" aria-hidden="true"></i>退出登录</a>
								</dd>
							</dl>

						</li>

					</ul>
					
				</div>
			</div>

			<!-- 垂直导航 -->
			<div class="layui-side layui-bg-black" id="admin-side" style="box-shadow: 2px 0 6px rgba(0,21,41,.35);background:#20222A !important">
				<div class="layui-side-scroll" id="admin-navbar-side" lay-filter="side">
					<ul class="layui-nav layui-nav-tree beg-navbar" style="background-color: #393D49;">

						<?php if(is_array($menu)): foreach($menu as $k=>$v): ?><li class="layui-nav-item" style="">
								<a href="javascript:;">
									<i class="layui-icon" style="font-size:14px"><?php echo ($v["icon_class"]); ?></i><cite><?php echo ($v["class"]); ?></cite><span class="layui-nav-more"></span>
								</a>
								<dl class="layui-nav-child">
									<!-- 导航 -->
									<?php if(is_array($v['data'])): foreach($v['data'] as $kk=>$vv): ?><dd title="<?php echo ($vv["remark"]); ?>" onclick="jump_page('/ygcrafts/admin.php/<?php echo ($vv["ac"]); ?>/<?php echo ($vv["op"]); ?>.html','<?php echo ($v["class"]); ?>','<?php echo ($vv["remark"]); ?>')">
											<a href="javascript:;" ><cite><?php echo ($vv["remark"]); ?></cite></a>
										</dd><?php endforeach; endif; ?>
								</dl>
							</li><?php endforeach; endif; ?>
						<span class="layui-nav-bar" style="top: 247.5px; height: 0px; opacity: 0;"></span>
					</ul>
				</div>
			</div>

			<!-- 点击加载的内容 -->
			<div class="layui-body" style=" top:0px;margin-top:60px;bottom:-0" id="admin-body">
				<div class="layui-tab admin-nav-card layui-tab-brief wen_nav" lay-filter="admin-tab" style="height:calc(100% - 49px);">
					<!--  -->
					<ul class="wen_tab">
						<li><a onclick="jump_page('/ygcrafts/admin.php/index/main')" class="wen_cc" href="">首页 </a></li>
						<!-- <li class="wen_cc">/</li>
						<li><a href="/" class="wen_cc">演示</a></li>
						<li class="wen_cc">/</li>
						<li><span>导航元素</span></li> -->
					</ul>
					<!--  -->
					<div class="layui-tab-content" style="min-height: 150px; padding: 0px 0 0 0;height:100%;background:#f0f2f5">
						<div class="layui-tab-item layui-show" style="height:100%">
							<iframe id="ifr" src="/ygcrafts/admin.php/Index/main.html" ></iframe>
						</div>
					</div>
				</div>
			</div>
			<!-- 页脚说明 -->
			<!-- <div class="layui-footer footer footer-demo" id="admin-footer">
				<div class="layui-main">
					<p>2017 &copy;
						<a href="http://wenlei111.gitee.io/web/">http://wenlei111.gitee.io/web/</a>
					</p>
				</div>
			</div> -->
			<!-- 手机版弹出按钮 -->
			<div class="site-tree-mobile layui-hide">
				<i class="layui-icon">&#xe602;</i>
			</div>
			<div class="site-mobile-shade"></div>

		</div>
	</body>

</html>

<script>
// ifram加载
function jump_page(url,class_,remark){
	// alert(remark);
	$("dd[title="+remark+"]").attr('class','layui-this');
	// $("dd[title="+remark+"]").parent().attr('class','layui-nav-itemed');
	// $("dd[title="+remark+"]").parent().siblings().css('background','red');

	// $("dd[title="+remark+"]").click();
	$("iframe").attr('src','');
	$("#ifr").attr('src',url);
	if(remark){
	//点击加载面包屑导航
	$(".wen_tab").children().remove();
	$(".wen_tab").append('<li><a onclick="jump_page("/ygcrafts/admin.php/index/main.html")" class="wen_cc" href="">首页</a></li><li class="wen_cc">/</li><li ><a class="wen_cc">'+class_+'</a></li><li class="wen_cc">/</li><li><a class="wen_cc">'+remark+'</a></li>');
	}
}
//导航折叠
$(function(){  
    $('.layui-side-scroll li').click(function(){
    	$(this).siblings().removeClass('layui-nav-itemed');
    })
});



</script>